package com.eight.cloud.redisson.config;

import lombok.extern.slf4j.Slf4j;
import org.redisson.connection.ConnectionListener;

import java.net.InetSocketAddress;

/**
 * redis连接监听器
 *
 * @ClassName: RedisConnectionListener
 * @Author: TXC
 * @Date: 2025-02-11 15:24
 **/
@Slf4j
public class RedisConnectionListener implements ConnectionListener {
    @Override
    public void onConnect(InetSocketAddress addr) {
        log.info("redis连接成功: {}", addr);
    }

    @Override
    public void onDisconnect(InetSocketAddress addr) {
        log.error("redis连接断开: {}", addr);
    }
}
